package com.gxa.usermanagement.controller;

import com.gxa.common.R;
import com.gxa.common.entity.usermange.Merchant;
import com.gxa.usermanagement.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @Autowired
    private LoginService loginService;

    @GetMapping("/login")
    public R loginController(String userName, String passWord){
        System.out.println(userName);
        return loginService.loginService(userName,passWord);
    }

    @GetMapping("/updatePassWord")
    public R updatePassWord(String phone, String passWord){
        return loginService.updatePassWordService(phone,passWord);
    }

    @GetMapping("/phone")
    public R auditPassWord(String phone ){

        return loginService.auditPassWordService(phone);
    }


}
